<?php

declare(strict_types=1);

namespace App\Record\Model;

use Mine\MineModel;

/**
 * @property int $id 
 * @property string $order_sn 订单号
 * @property string $transaction_id 第三方支付单号
 * @property int $user_id 用户ID
 * @property int $coupon_id 优惠券ID
 * @property int $money 订单金额(分)
 * @property int $discount 折扣金额(分)
 * @property int $fact_money 实付金额(分)
 * @property int $received_amount 到账金额
 * @property int $method_id 支付方式
 * @property string $ip ip
 * @property int $biz_id 业务ID
 * @property int $biz_type 业务类型1充值钻石
 * @property int $complete_time 订单完成时间
 * @property int $expire_time 订单超时时间
 * @property int $pay_time 支付成功时间
 * @property int $status 订单状态(0刚下单,1.已回调,2.支付成功,3.订单已关闭)
 * @property int $created_by 所属代理
 * @property int $create_time 创建时间
 * @property int $update_time 更新时间
 */
class RecordPaymentOrder extends MineModel
{
    protected ?string $dateFormat = 'U';
    const CREATED_AT = 'create_time';
    const UPDATED_AT = 'update_time';
    /**
     * The table associated with the model.
     */
    protected ?string $table = 'record_payment_order';

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = ['id', 'order_sn', 'transaction_id', 'user_id', 'coupon_id', 'money', 'discount', 'fact_money', 'received_amount', 'method_id', 'ip', 'biz_id', 'biz_type', 'complete_time', 'expire_time', 'pay_time', 'status', 'created_by', 'create_time', 'update_time'];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = ['id' => 'integer', 'user_id' => 'integer', 'coupon_id' => 'integer', 'money' => 'integer', 'discount' => 'integer', 'fact_money' => 'integer', 'received_amount' => 'integer', 'method_id' => 'integer', 'biz_id' => 'integer', 'biz_type' => 'integer', 'complete_time' => 'integer', 'expire_time' => 'integer', 'pay_time' => 'integer', 'status' => 'integer', 'created_by' => 'integer', 'create_time' => 'integer', 'update_time' => 'integer'];
}
